{% extends 'layout.html' %}

{% block content %}
    <div class="container">
        <div class="panel panel-default">
            <div class="panel-heading">
                <h3 class="panel-title">添加用户</h3>
            </div>
            <div class="panel-body" style="padding-left: 30px">
                <form method="post">
                    {% csrf_token %}
                    <div class="form-group">
                        <label>用户名</label>
                        <input type="text" class="form-control" placeholder="用户名" name="name">
                    </div>
                    <div class="form-group">
                        <label>密码</label>
                        <input type="text" class="form-control" placeholder="密码" name="password">
                    </div>
                    <div class="form-group">
                        <label>年龄</label>
                        <input type="text" class="form-control" placeholder="年龄" name="age">
                    </div>
                    <div class="form-group">
                        <label>余额</label>
                        <input type="text" class="form-control" placeholder="余额" name="account">
                    </div>
                    <div class="form-group">
                        <label>入职时间</label>
                        <input type="date" class="form-control" placeholder="入职时间" name="create_time">
                    </div>
                    <div class="form-group">
                        <label>性别</label>
                        {#                        <input type="text" class="form-control" placeholder="性别" name="gender">#}
                        <select class="form-control" placeholder="性别" name="gender">
                            {% for item in gender_choices %}
                                <option value="{{ item.0 }}">{{ item.1 }}</option>
                            {% endfor %}
                        </select>
                    </div>
                    <div class="form-group">
                        <label>所属部门</label>
{#                        <input type="text" class="form-control" placeholder="所属部门" name="depart_id">#}
                        <select class="form-control" placeholder="性别" name="depart_id">
                            {% for item in depart_list %}
                                <option value="{{ item.id }}">{{ item.title }}</option>
                            {% endfor %}
                        </select>
                    </div>
                    <button type="submit" class="btn btn-success">保存</button>
                </form>
            </div>
        </div>
    </div>

{% endblock %}